Skip to contentSkip to conversation

vega56 undervolting/overclocking voltage issues

Bug 109887 [email protected] 1 participant 19 messages Mar 6, 2019 – Oct 31, 2019

lore
Share & tools
lore
#0 lore raw

https://bugs.freedesktop.org/show_bug.cgi?id=109887

Bug ID: 109887
Summary: vega56 undervolting/overclocking voltage issues
Product: DRI
Version: unspecified
Hardware: x86-64 (AMD64)
OS: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: DRM/AMDgpu
Assignee: [email protected]
Reporter: [email protected]

Created attachment 143547
--> https://bugs.freedesktop.org/attachment.cgi?id=143547&action=edit
dmesg output

I overwrite "pp_od_clk_voltage" to control the voltage, but I have a problem.

The GPU voltage represents the value of "/sys/class/drm/card0/device/hwmon/hwmon0/in0_input"

If I set "pp_od_clk_voltage" before starting Xorg/compton/WM, the GPU voltage will be locked at 1200mv.
If I set "pp_od_clk_voltage" after starting Xorg/compton/WM, the GPU is locked to 1200mv after a heavy load.

Unless I set "echo c > /sys/class/drm/card0/device/pp_od_clk_voltage" again, the idle voltage will return to 900-950mv.But still higher than the set value.

Then we have a new problem.I can't control the "P7" voltage by setting "pp_od_clk_voltage". The value in "pp_od_clk_voltage" can be changed, but the reading is always 1200mv when the GPU jumps to "P7".

I set "P6" and "P7" to the same value to prevent the GPU from jumping to "P7"

My "pp_od_clk_voltage" setting:
OD_SCLK:

0:        852Mhz        800mV
1:        974Mhz        825mV
2:       1096Mhz        850mV
3:       1218Mhz        875mV
4:       1340Mhz        900mV
5:       1462Mhz        925mV
6:       1584Mhz        950mV
7:       1584Mhz        950mV
OD_MCLK:
0:        167Mhz        800mV
1:        500Mhz        800mV
2:        700Mhz        900mV
3:        800Mhz        950mV
OD_RANGE:
SCLK:     852MHz       2400MHz
MCLK:     167MHz       1500MHz
VDDC:     800mV        1200mV

Default "pp_od_clk_voltage" setting
OD_SCLK:

0:        852Mhz        800mV
1:        991Mhz        900mV
2:       1138Mhz        950mV
3:       1269Mhz       1000mV
4:       1312Mhz       1050mV
5:       1474Mhz       1100mV
6:       1538Mhz       1150mV
7:       1590Mhz       1200mV
OD_MCLK:
0:        167Mhz        800mV
1:        500Mhz        800mV
2:        700Mhz        900mV
3:        800Mhz        950mV
OD_RANGE:
SCLK:     852MHz       2400MHz
MCLK:     167MHz       1500MHz
VDDC:     800mV        1200mV

RYZEN 1700
MSI B350M MORTAR
PowerColor Radeon RX Vega 56

Linux 5.0.0-arch1-1-ARCH #1 SMP PREEMPT Mon Mar 4 14:11:43 UTC 2019 x86_64 GNU/Linux

Thanks!

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=109887

--- Comment #2 from [email protected] --- Created attachment 143549
--> https://bugs.freedesktop.org/attachment.cgi?id=143549&action=edit
pp_table

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=109887

--- Comment #3 from [email protected] ---
You need to have a kernel command line parameter and c is used to commit changes. See: https://wiki.archlinux.org/index.php/AMDGPU#Overclocking

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=109887

--- Comment #4 from [email protected] --- (In reply to fin4478 from comment #3)

Quoted 2 lines

You need to have a kernel command line parameter and c is used to commit changes. See: https://wiki.archlinux.org/index.php/AMDGPU#Overclocking

Yes, I use "c" to commit changes, the GPU frequency can always be modified, but the voltage does not take effect.

I use parameters:

# echo s 1 974 825 > /sys/class/drm/card0/device/pp_od_clk_voltage
# echo s 2 1096 850 > /sys/class/drm/card0/device/pp_od_clk_voltage
# echo s 3 1218 875 > /sys/class/drm/card0/device/pp_od_clk_voltage
# echo s 4 1340 900 > /sys/class/drm/card0/device/pp_od_clk_voltage
# echo s 5 1462 925 > /sys/class/drm/card0/device/pp_od_clk_voltage
# echo s 6 1584 950 > /sys/class/drm/card0/device/pp_od_clk_voltage
# echo s 7 1584 950 > /sys/class/drm/card0/device/pp_od_clk_voltage
# echo c > /sys/class/drm/card0/device/pp_od_clk_voltage
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#5 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=109887

--- Comment #5 from [email protected] ---
Did you manage to get this resolved. I have the same issue and in my case setting P6 = P7 Frequency, the memory clock gets stuck at P0 167 Mhz. I tried 5.1 RC-3 but no joy either.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#6 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=109887

--- Comment #6 from Jon Doane <[email protected]> ---
I'm also having this particular issue with a Vega 64. It appears that setting any non-stock voltage to any of the power states will cause the voltage at any clock to jump to 1.20v. I haven't been able to find a way around it yet.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#7 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=109887

--- Comment #7 from hagar-dunor <[email protected]> ---
Met the same annoyance, and found a rather convoluted way to get around it. It would be better overclocking/undervolting work by setting pp_od_clk_voltage only.

https://forum.level1techs.com/t/how-to-overclock-vega-on-linux/132771/65

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#8 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=109887

--- Comment #8 from Andrew Sheldon <[email protected]> --- I also can confirm the problem, and it seems to have gotten worse since 5.3.0-rcX.

In past kernels, you could kind of work around it by setting slightly less conservative undervolts and it would work. If you go past a certain point (a point that works fine if the pp table is overridden), it would wrap around to 1.2V. For reference this around 950mv at state 6/7.

Now with 5.3, even that same relatively conservative undervolt would immediately jump to 1.2V under load.

As hagar-dunor suggested, manually overriding the entire PP table, works around the problem.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#9 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=109887

--- Comment #9 from Andrew Sheldon <[email protected]> --- Here's a linux pp table editor that also seems to support more options (such as raising the power cap) than OverDriveNTool:
https://github.com/amezin/powerplay-table-editor

I will note that you might still see raised voltages if you do a too aggressive overclock/undervolt with modded PP tables, but it seems to only overvolt as much as is needed (say 975mv -> 1.05V) if you set a too high clock, rather than jumping to the maximum possible voltage that you see by editing pp_od_clk_voltage.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#10 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=109887

--- Comment #10 from Andrew Sheldon <[email protected]> --- (In reply to Andrew Sheldon from comment #9)

Quoted 5 lines

I will note that you might still see raised voltages if you do a too aggressive overclock/undervolt with modded PP tables, but it seems to only overvolt as much as is needed (say 975mv -> 1.05V) if you set a too high clock, rather than jumping to the maximum possible voltage that you see by editing pp_od_clk_voltage.

Replying to myself here. I've found that the raised voltage occurs when forcing GPU state to "high". If I then re-write the PP table again, it settles on the correct voltage, and successfully switches to "high" after. I'm not sure if this is related to some of the other voltage issues, but there you go. This occurs on both 5.2.3 and 5.3-rc2, for the record.

I have to do this every time I force to "high", BTW.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#11 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=109887

--- Comment #11 from Stefan Springer <[email protected]> --- Loading a powerplay table only temporarily alleviates the issue. It comes back after a while of desktop usage.

I think the culprit might be here:
https://github.com/torvalds/linux/blob/master/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c#L348

Why set the voltage for a state to max_vddc in the first place?

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#12 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=109887

--- Comment #12 from Stefan Springer <[email protected]> --- Actually, it gets reset to 1200mV every time the resolution changes. I.e. when launching a fullscreen game or restarting the display manager.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#13 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=109887

Stefan Springer <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #13 from Stefan Springer <[email protected]> --- *** Bug 110113 has been marked as a duplicate of this bug. ***

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#14 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=109887

--- Comment #14 from Stefan Springer <[email protected]> --- *** Bug 110347 has been marked as a duplicate of this bug. ***

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#15 lore raw

[Bug 109887] [Vega10][powerplay] P7 gets reset to max_vddc (1.2V/1.25V) after applying any custom settings via pp_od_clk_voltage and/or pp_table

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=109887

Stefan Springer <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

            Summary|vega56                      |[Vega10][powerplay] P7 gets
                   |undervolting/overclocking   |reset to max_vddc
                   |voltage issues              |(1.2V/1.25V) after applying
                   |                            |any custom settings via
                   |                            |pp_od_clk_voltage and/or
                   |                            |pp_table
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#16 lore raw

[Bug 109887] [Vega10][powerplay] P7 gets reset to max_vddc (1.2V/1.25V) after applying any custom settings via pp_od_clk_voltage and/or pp_table

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=109887

--- Comment #15 from Stefan Springer <[email protected]> --- The patch Pelle van Gils proposed here works flawlessly for me:
https://bugzilla.kernel.org/show_bug.cgi?id=205277

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#17 lore raw

[Bug 109887] [Vega10][powerplay] P7 gets reset to max_vddc (1.2V/1.25V) after applying any custom settings via pp_od_clk_voltage and/or pp_table

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=109887

[email protected] changed:

What |Removed |Added
----------------------------------------------------------------------------

           See Also|                            |https://bugzilla.kernel.org
                   |                            |/show_bug.cgi?id=205277
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#18 lore raw

[Bug 109887] [Vega10][powerplay] P7 gets reset to max_vddc (1.2V/1.25V) after applying any custom settings via pp_od_clk_voltage and/or pp_table

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=109887

[email protected] changed:

What |Removed |Added
----------------------------------------------------------------------------

         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel